/*************************************************************************
    > File Name: code.c
    > Author: ma6174
    > Mail: ma6174@163.com 
    > Created Time: Thu 20 Feb 2025 12:38:55 PM CST
 ************************************************************************/

#include<stdio.h>
#include<unistd.h>
#include<sys/types.h>                //定义pit_t类型(进程ID的数据类型)
#include<unistd.h>                   //声明geipid()和getppid()函数

int main()
{
	printf("process is running, only me!, pid: %d\n",getpid());
	sleep(3);
	fork();
	printf("\n------\n");
	printf("hello world!, pid: %d, ppid: %d\n",getpid(),getppid());
	sleep(3);
	printf("\n------\n");
	return 0;
}

